<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const xhr = new XMLHttpRequest();
      xhr.onreadystatechange = function (e) {
        if (xhr.readyState === 4) {
          const obj = JSON.parse(xhr.responseText);
          console.log(obj);
        }
      };
      xhr.open("GET", "https://study.duyiedu.com/api/herolist");
      // xhr.setRequestHeader("Content-Type", "application/json");
      xhr.send(null);
    </script>
  </body>
</html>
